{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def functionA():\n",
    "    print(\"哈哈\")\n",
    "\n",
    "\n",
    "functionA()\n",
    "functionA()\n",
    "functionA()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def functionB(f: str):\n",
    "    print(f\"{f}哈哈\")\n",
    "\n",
    "\n",
    "functionB(\"谭清文\")\n",
    "functionB(\"丁小格\")\n",
    "functionB(\"纳豆\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def functionC(name: str, age: int):\n",
    "    print(f\"{name}哈哈,今年{age}岁\")\n",
    "\n",
    "\n",
    "functionC(\"谭清文\", 11)\n",
    "functionC(\"丁小格\", 12)\n",
    "functionC(\"纳豆\", 15)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "from SubFunc import printType\n",
    "\n",
    "\n",
    "def functionD(name: str, age=18, *args: int, **kwargs):\n",
    "    print(f\"名字:{name},年龄:{args},其他:{args}\")\n",
    "    printType(args)\n",
    "    printType(kwargs)\n",
    "\n",
    " \n",
    "functionD(\"谭清文\")\n",
    "functionD(\"谭清文\", 2, 3, 4, 5, 6)\n",
    "functionD(\"谭清文\", 2, 3, 4, 5, 6, a=1, b=2)  # 后面带等号的会存为dict\n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": 3
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
